#include "../../../Include/Utils/Ticker/WizUtilsTicker.hpp"


namespace Wiz
{
    namespace Ticker
    {
        namespace Object
        {
            namespace Composite
            {
                template<class TimeT>
                Type<TimeT>::Type(tTicker* TPtr) :  tSuper(TPtr)
                {
                }

                template<class TimeT>
                Type<TimeT>::~Type()
                {
                    this->m_TotalTime = 0;
                }

                template<class TimeT>
                ::Wiz::Void::Type Type<TimeT>::DoTick(const tTime& DeltaTime)
                {
                    tSuper::DoTick(DeltaTime);
                    this->m_Signal(DeltaTime);
                }

                template<class TimeT>
                ::Wiz::Void::Type Type<TimeT>::Register(const tSuper* ObjPtr)
                {
                    WIZ_ASSERT(::Wiz::IsValidPtr(ObjPtr));
                    this->m_Signal.Register(ObjPtr, ObjPtr->GetDoTick());
                }

                template<class TimeT>
                ::Wiz::Void::Type Type<TimeT>::Unregister(const tSuper* ObjPtr)
                {
                    WIZ_ASSERT(::Wiz::IsValidPtr(ObjPtr));
                    this->m_Signal.Unregister(ObjPtr, ObjPtr->GetDoTick());
                }

                //////////////////////////////////////////////////////////////////////////
                template class Type<::Wiz::Real32::Type>;
                template class Type<::Wiz::Real64::Type>;

                template class Type<::Wiz::Int8::Type>;
                template class Type<::Wiz::Int16::Type>;
                template class Type<::Wiz::Int32::Type>;
                template class Type<::Wiz::Int64::Type>;
                //////////////////////////////////////////////////////////////////////////
            } /// end of namespace Composite
        } /// end of namespace Object
    } /// end of namespace Ticker
} /// end of namespace Wiz
